package com.backend.mapper;

import com.backend.entity.entity.Devices;
import com.backend.entity.entity.Users;
import com.backend.entity.entity.WorkOrders;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

@Mapper
public interface AdminMapper {
    // 用户管理
    List<Users> selectAllUsers();
    int deleteUserByUsername(String username);
    List<Users> selectUserByUsername(String username);

    // 订单管理
    List<WorkOrders> selectAllOrders();
    int deleteOrderById(Integer orderId);
    List<WorkOrders> selectOrdersByDeviceCode(String deviceCode);
    int updateOrderStatus(Integer orderId, Integer status, String deviceCode, Integer repairmanId);
    // 设备管理
    int insertDevice(Devices device);
    List<Devices> selectAllDevices();
    Devices selectDeviceByCode(String deviceCode);
    int deleteDeviceById(Integer deviceId);
    int updateDeviceInfo(Devices device);
}
